﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>用户</title>
    <link rel="stylesheet" href="./layui/css/layui.css" media="all">
</head>

<body>

    <table id="demo" lay-filter="test"></table>

    <script src="./layui/layui.js"></script>
    <script>
        layui.use('table', function() {
            var table = layui.table;

            table.render({
                elem: '#demo',
                height: 'full-100',
                url: '/v1/users' //数据接口
                    ,
                page: true //开启分页
                    ,
                cols: [
                    [ //表头
                        {
                            field: 'Id',
                            title: 'ID',
                            width: 80,
                            sort: true,
                            fixed: 'left'
                        }, {
                            field: 'Name',
                            title: '用户名',
                            width: 80
                        }, {
                            field: 'Password',
                            title: '密码',
                            width: 80
                        }, {
                            field: 'Memo',
                            title: '说明',
                            width: 80,
                            sort: true
                        }
                    ]
                ]
            });

        });
    </script>
</body>

</html>